/*
 * @Author: RYPY
 * @Date: 2021-04-28 14:17:16
 * @LastEditors: RYPY
 * @LastEditTime: 2021-04-29 11:38:57
 */
//同步-》异步-》延时

console.log("start");//t   1
setTimeout(()=>{//y
    console.log("settimeout");//5
},0);
new Promise((resolve)=>{
    console.log("p1");//t   2
    reject();//异步开始
}).then(()=>{
    console.log("p2");
},()=>{
    console.log("p3");// 4  
});
console.log("end");//t     3